<template>
  <el-menu
    :default-active="route.path === '/' ? route.path : route.path.substring(1)"
    :router="true"
    class="el-menu-vertical-demo"
  >
    <el-sub-menu index="user" class="el-menu">
      <template #title>
        <el-icon><Setting /></el-icon>
        <span>用户管理</span>
      </template>
      <el-menu-item index="users">用户列表</el-menu-item>
    </el-sub-menu>
    <el-sub-menu index="rights">
      <template #title>
        <el-icon><Setting /></el-icon>
        <span>角色管理</span>
      </template>
      <el-menu-item index="roles">角色列表</el-menu-item>
      <el-menu-item index="permission">权限列表</el-menu-item>
    </el-sub-menu>
  </el-menu>
</template>

<script setup>
import { RouterView, useRoute, useRouter } from 'vue-router'

const route = useRoute()
</script>

<style lang="scss" scoped></style>
